Skip to main content

Supplier User Invitation

This import will invite supplier users to ViSN. The system will validate each row and send invitation emails to valid users.

Fields

Field NameDescriptionDatatypeValidationMax lengthMandatoryExample
DI Group IDSupplier group identifierstringValid Firestore ID-YesaxzKXxJuYDD0YjMXdRk5
DI Supplier IDDefault service unitstringValid Firestore ID-No*5O4DQ6mL9bKlwdlcU3dF
Is Head Office UserIndicates if user is head officestringY/N only1YesN
First NameUser's first namestringA-Z 0-9 and Special Characters50YesJohnny
Last NameUser's last namestringA-Z 0-9 and Special Characters50YesBairstow
Email IdUser's email addressstringValid email format100Yesjohnny.bairstow@mail.com
RoleUser's role name to be assignedstringA-Z 0-9 and Special Characters-Yestest
Additional DI Supplier IDsAdditional service unitsstringValid Firestore IDs, semicolon separated-NodsdKDZlx5tt7sZGiBBQ8;axzKXxJuYMd0YjMXdRk5

*Required for non-head office users

Importing a file

Preparation

  1. Create a new branch with Jira task number in the branch name

  2. Delete all the files in importFiles folder

  3. Create a folder with the current sprint number

  4. Copy the file that needs to be imported

  5. Go to package.json, find the line validate:supplierUserInvites

  6. Modify --file with the relative path of the file

  7. Save package.json

Validating locally

  1. In a terminal run npm run validate:supplierUserInvites

  2. If there are no errors, push the code

Validating in workflow

  1. Go to Action of Import-manager

  2. Find <Environment> - on-demand-import

  3. Select the branch that was created for this import

  4. Enter script name as validate:supplierUserInvites

  5. Leave Overrides empty

Importing the file

  1. If the validation has passed

  2. Go to Action of Import-manager

  3. Find <Environment> - on-demand-import

  4. Select the branch that was created for this import

  5. Enter script name as import:supplierUserInvites

  6. Enter --persist in Overrides field

Validation Rules

Basic Information Validation

  • DI Group ID must be present and valid
  • Role must be present and exist in group settings

Head Office User Validation

  • Service Unit ID must not be provided for head office users
  • Additional Service Unit IDs are not allowed for head office users

Non-Head Office User Validation

  • Service Unit ID is mandatory
  • Service Unit must exist and be in 'live' status
  • Additional Service Unit IDs must exist and be in 'live' status

Existing Records Check

  • Email must not be already registered in the system
  • Email must not have an existing pending invitation

Testing

  1. Invitation emails will be sent to valid users.
Status: Accepted
Category: Protected
Authored By: Sohan on Jun 3, 2025